export const paramsToObj = (params) => {
	let result = {}
	if (typeof params === 'string' && params !== '') {
		let paramsArr = params.split('&')
		paramsArr.forEach((item) => {
			const data = item.split('=')
			result[data[0]] = data[1]
		})
	}
	return result
}